-
Notifications
You must be signed in to change notification settings - Fork 303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor topic_tools to use app-based settings and remove unused ASSE… #4095
Refactor topic_tools to use app-based settings and remove unused ASSE… #4095
Conversation
…SSMENT_ITEMS_FILEPATH
…files until proper settings layout is in place
This is the path that KA Lite will use to look for KA Lite video files to play. Change the path to another local directory to get video files from that directory. NB! Directory has to be writable for the user running the server in order to download videos. | ||
* ASSESSMENT_ITEMS_DATABASE_PATH = "<path to desired content folder>" (default=~/.kalite/content/assessmentitems.sqlite) |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Conflicts: kalite/distributed/management/commands/setup.py
@@ -8,17 +8,18 @@ | |||
from multiprocessing.dummy import Pool as ThreadPool | |||
from threading import Lock | |||
|
|||
from django.conf import settings | |||
from django.conf import settings as django_settings |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Going to work on @jamalex 's comment about settings.DATABASES being initialized from a default ASSESSMENT_ITEM_DATABASE_PATH |
The easy solution seems to be that we should not let the ASSESSMENT_ITEM_DATABASE_PATH be configurable for now. It's an odd case: We want CONTENT_ROOT to be configurable for serving media, yet we need a database connection established on the basis of where CONTENT_ROOT points. I would suggest to leave it out of the docs. In a longer perspective, things like settings.DATABASES should always be configured through ENVIRONMENT, it's a suitable "high-level" approach for this specific setting and that would also follow from normal conventions. We could mention settings.DATABASES in the docs instead, but it's kind of a heavy chapter and people who want to mess with it are better off reading the source code and the django documentation. |
Another issue regarding this is about the system-wide assessment items.... they might mean that the database is in a different location, forcing this logic to be pushed back the settings.base :( |
Okay, so do assessment items count as user data or application data? In one sense they are application data since they are associated with a version, but in another sense they are user data since they can be downloaded after installation and their location on disk is configurable. (Though this is not the case in Windows! where assessment items are bundled with the installer.) What are the likely cases where the end-user will install ka-lite and download the assessment items separately? |
@MCGallaspy The most likely cases are:
|
…T_ROOT, change docs to match
# MY_SETTING_VAR = 123 | ||
from kalite.project.settings.raspberry_pi import * | ||
# Put your settings here, e.g. | ||
# MY_SETTING_VAR = 123 |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* CONTENT_ROOT = "<path to desired content folder>" (default=ka-lite/content) | ||
This is the path that KA Lite will use to look for KA Lite video files to play. Change the path to another local directory to get video files from that directory. NB! Directory has to be writable for the user running the server in order to download videos. | ||
* TIME_ZONE = <desired time zone> (default = "America/Los_Angeles") | ||
* ``DEBUG = <True or False> (default = False)`` |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This PR is very critical, as there are no one else who have expressed a desire for a review, I'm going to merge it so we can see if it works. |
Refactor topic_tools to use app-based settings and remove unused ASSE…
We found a couple of early blockers before 0.14 is released. This was supposed to be schedule for 0.15, but it's hard to fix without solving parts of #4054.